package com.ethink.system.facade.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ethink.system.api.SystemTodoFacade;
import com.ethink.system.api.info.SystemTodoInfo;
import com.ethink.system.api.request.SystemTodoAddRequest;
import com.ethink.system.api.request.SystemTodoListPendingRequest;
import com.ethink.system.api.request.SystemTodoUpdateRequest;
import com.ethink.system.api.response.SystemTodoAddResponse;
import com.ethink.system.service.SystemTodoService;
import java.util.List;

/**
 * 代办事项表 Facade接口实现
 *
 * @author default
 * @date 2022-12-09
 */
@RestController
@Slf4j
@RequestMapping("system-service/facade/v1/systemTodo")
public class SystemTodoFacadeImpl implements SystemTodoFacade {

    @Autowired
    private SystemTodoService systemTodoService;

    @Override
    public List<SystemTodoInfo> listSystemTodoPending(SystemTodoListPendingRequest request) {
        return systemTodoService.listSystemTodoPending(request);
    }

    @Override
    public SystemTodoAddResponse addSystemTodo(SystemTodoAddRequest request) {
        return systemTodoService.addSystemTodo(request);
    }

    @Override
    public void updateSystemTodo(SystemTodoUpdateRequest request) {
        systemTodoService.updateSystemTodo(request);
    }

    @Override
    public void doneSystemTodo(Long systemTodoId) {
        systemTodoService.doneSystemTodo(systemTodoId);
    }

    @Override
    public void doneSystemTodoByDataId(Integer todoType, String dataId) {
        systemTodoService.doneSystemTodoByDataId(todoType, dataId);
    }

    @Override
    public void deleteSystemTodo(Long systemTodoId) {
        systemTodoService.deleteSystemTodo(systemTodoId);
    }

    @Override
    public void deleteSystemTodoByDataId(String systemTodoDataId) {
        systemTodoService.deleteSystemTodoByDataId(systemTodoDataId);
    }

}